import './utils/polyfill'
import Vue from 'vue'
import App from './App.vue'
import './utils/rem'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import router from './router'
import store from './store'
import './global-components'
import Layout from './components/layout'
import titleMixin from './utils/titleMixin'
import { parseTime } from './utils/assist'
import validateMixin from './utils/validateMixin'

// 布局组件
Vue.component('layout', Layout)
// 全局混合，document.title
Vue.mixin(titleMixin)

Vue.mixin(validateMixin)

Vue.filter('parseTime', parseTime)

window.$store = store

Vue.config.productionTip = false

const MsgBox = MintUI.MessageBox

Vue.prototype.$msgbox = MsgBox

Vue.prototype.$alert = MsgBox.alert

Vue.prototype.$confirm = MsgBox.confirm

Vue.prototype.$prompt = MsgBox.prompt

// Vue.component(Button.name, Button)
// Vue.component(Cell.name, Cell)
Vue.use(MintUI)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
